package org.example.entity.task;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * @TableName tb_task_scan
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "tb_task_scan")
public class Scan implements Serializable {
    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 扫描任务id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 测试员姓名
     */
    private Integer tester;
    /**
     * 漏洞扫描任务名
     */
    private String scanName;
    /**
     * 我的任务id
     */
    private Integer myTaskId;
    /**
     * 扫描目标
     */
    private String scanTarget;
    /**
     * 扫描策略
     */
    private String scanPolicy;
    /**
     *
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date scanTime;
    /**
     * 发现的漏洞
     */
    private String foundVul;
    /**
     * 漏洞id,例如 CVE-2022-0626
     */
    private String vulNo;
    /**
     *
     */
    private String scanTools;
    /**
     * 危险等级：高危，中危等
     */
    private String riskLevel;
}